<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>叩丁狼客户关系管理系统-商品管理</title>
    <%@ include file="/WEB-INF/views/common/common.jsp" %>
    <script type="text/javascript" src="/static/js/system/product.js"></script>
    <style>
        #div2 {
            float: right;
            margin-top: 5px;
        }

        /* .space {
                margin: 0 8px;
                background-color: white;
            }*/

        .space1 {
            border: 5px solid #f5f5f5;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".btn1").click(function () {
                $("#tog").toggle();
            });
        });
    </script>
</head>
<body>

<div style="height: 200px ;width: 100%;float:left;" id="tog">
    <div style="width: 50%;float: left" ; class="space">
        <div style="width: 48% ; height:200px;float: left; " class="space1">共有商品
            <br/><br/><br/>
            <div style="text-align: center"><font style="font-size: 40px ; color: red;"> <span id="totalNumber"></span>种</font>
            </div>
        </div>
        <div style="width: 48% ;height:200px;float: left" class="space1">商品的总成本价
            <br/><br/><br/>
            <div style="text-align: center"><font style="font-size: 40px ; color: red;"> <span id="totalAmount">0</span>元</font>
            </div>
        </div>
    </div>
    <div style="width: 50%;float: left">
        <div style="width: 48%;height:200px;float: left" class="space1">积分低于1000的商品

            <br/><br/><br/>
            <div style="text-align: center"><font style="font-size: 40px ; color: red;"> <span
                    id="integral"></span>种</font>
            </div>
        </div>
        <div style="width: 48%;height:200px;float: left" class="space1">近七天热卖TOP3商品<br/>
            <br/>1.韩国代购正品thesaem得鲜气垫豆沙色口红唇膏哑光雾面rd016件<br/>2.高保湿唇膏持久滋润裸色口红舒缓修护3件<br/>3.美国进口洁面乳2件
        </div>
    </div>
</div>

<!--商品列表-->
<table id="product_datagrid"></table>

<!--商品工具栏-->
<div id="tb" style="height: 40px">
    <a href="JavaScript:;" class="easyui-linkbutton" data-cmd="add"
       data-options="iconCls:'icon-add',plain:true">添加</a>
    <a href="JavaScript:;" class="easyui-linkbutton" data-cmd="edit"
       data-options="iconCls:'icon-edit',plain:true">编辑</a>
    <a href="JavaScript:;" class="easyui-linkbutton" data-cmd="remove"
       data-options="iconCls:'icon-remove',plain:true">删除</a>
    <a href="JavaScript:;" class="easyui-linkbutton" data-cmd="reload"
       data-options="iconCls:'icon-reload',plain:true">刷新</a>
    <a class="easyui-linkbutton" onclick="exportXls()" data-options="iconCls:'icon-redo',plain:true">导出</a>
    <a class="easyui-linkbutton" href="#" iconCls="icon-undo" plain="true">导入</a>

    <div id="div2" style="height: 30px; width: 600px" align="right">
        <button class="btn1">点击收缩</button>
        名称/编码: <input type="text" name="keyword" id="keyword">
        <%--&nbsp;&nbsp;一级分类:&nbsp;&nbsp;
        <input id="cc" class="easyui-combobox" name="firstLEvel"
               data-options=
                       "valueField:'id',
                     textField:'name',
                url:'/product/getItemByDataDictionarySn.do?sn='+'firstLevel'"/>--%>
        <a href="JavaScript:;" class="easyui-linkbutton" data-cmd="searchT"
           data-options="iconCls:'icon-search',plain:true">查询</a>
    </div>
</div>


<!--商品的添加与编辑对话框-->
<div id="product_dialog">
    <form id="editForm" method="post" enctype="multipart/form-data">
        <input type="hidden" name="id" id="productId">
        <table align="center" style="margin-top: 20px;
                border-collapse:separate; border-spacing:0px 10px;">
            <tr>
                <td>商品名称:</td>
                <td><input class="easyui-textbox" name="name"/></td>
            </tr>
            <tr>
                <td>商品编码:</td>
                <td><input class="easyui-textbox" name="sn"/></td>
            </tr>
            <tr>
                <td>成本价:</td>
                <td><input class="easyui-textbox" name="costPrice"/></td>
            </tr>
            <tr>
                <td>销售价:</td>
                <td><input class="easyui-textbox" name="salePrice"/></td>
            </tr>
            <tr>
                <td>积分:</td>
                <td><input class="easyui-textbox" name="integral"/></td>
            </tr>
            <tr>
                <td>商品规格:</td>
                <td><input class="easyui-textbox" name="specification"/></td>
            </tr>
            <tr>
                <td>商品图片:</td>
                <td>
                    <input type="file" name="pic" style="width: 160px;">
                    <img src="" id="imgId" style="width: 120px" height="100px"/>
                </td>
            </tr>
            <tr>
                <td>一级分类:</td>
                <td><input class="easyui-textbox" name="firstLevel"/></td>

            </tr>
            <tr>
                <td>二级分类:</td>
                <td><input class="easyui-textbox" name="secondLevel"/></td>
            </tr>
            <tr>
                <td>备注:</td>
                <td><input class="easyui-textbox" name="remark"/></td>
            </tr>
        </table>
    </form>
</div>

<!--编辑与添加对话框的按钮-->
<div id="bb">
    <a href="JavaScript:;" class="easyui-linkbutton"
       iconCls="icon-save" data-cmd="save">保存</a>
    <a href="JavaScript:;" class="easyui-linkbutton"
       iconCls="icon-cancel" data-cmd="cancel">关闭</a>
</div>
</body>
</html>
